<template>
  <Swipe  :show-indicators="false" :auto="0" :defaultIndex="currentIndex">
    <SwipeItem  v-for="elem in imgList" :key="elem.key">
        <div class="imgDiv" @click="innerImgClick()">
          <img class="contentImg" :src="elem">
        </div>
    </SwipeItem>
  </Swipe>

</template>
<script>
import { Swipe, SwipeItem } from 'mint-ui';
import 'mint-ui/lib/swipe/style.css'
import 'mint-ui/lib/swipe-item/style.css'
export default {
  name: "PreImageView",
  props: ['currentIndex', // 当前显示第几张
          'imgList'
         ],
  components: {
    Swipe, SwipeItem
  },
  data() {
    return {

    };
  },
  methods: {
    innerImgClick() {
      this.$emit("innerImgClick");
    }
  }
}
</script>
<style lang="css" scoped>

.imgDiv {
  width: 100%;
  height: 100%;
  display:flex;
  justify-content:center;
  align-items:center;
}

.contentImg {
  width: 100%;
}

</style>
